import axios from "axios";

const Host: string = "8080";
const BaseURL: string = "http://localhost:" + Host + "/font";
const BackURL: string = "http://localhost:" + Host + "/back";

// 添加请求拦截器
axios.interceptors.request.use(
  (config) => {
    console.log("发送了一个请求");

    return config;
  },
  () => {
    console.log("发生错误啦");
  }
);

// 添加响应拦截器
axios.interceptors.response.use(
  function (response) {
    console.log("接收到一个响应");
    return response;
  },
  function (error) {
    console.log("发生错误啦");
    return Promise.reject(error);
  }
);

export { BaseURL, BackURL };
